﻿Imports System.Net.Mail

Public Class _default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub
    'Protected Sub btnEnviarLinks_Click(sender As Object, e As EventArgs) Handles btnEnviarLinks.Click
    '    If Not String.IsNullOrEmpty(txtCorreoElectronico.Text.Trim) Then
    '        Call subEnviaEmail()
    '    End If
    'End Sub
    'Private Sub subEnviaEmail()
    '    'Dim msg As New System.Net.Mail.MailMessage()
    '    '200.54.77.43

    '    Dim email_links As New MailMessage()
    '    Dim smtpRosen As New SmtpClient("baker.rosenchile.local")

    '    Dim strHTML As String = ""

    '    strHTML += "<table cellpadding='0' cellspacing='0'>"
    '    strHTML += "<tr>"
    '    strHTML += "<td>"
    '    strHTML += "<a href='http://200.54.77.43/wikiprecios/wikiprecios.htm' target='_blank'>WikiPrecios Versión Web</a>"
    '    strHTML += "</td>"
    '    strHTML += "</tr>"
    '    strHTML += "<tr>"
    '    strHTML += "<td>"
    '    strHTML += "<a href='http://200.54.77.43/wikiprecios/apk/wikiprecios.apk' target='_blank'>WikiPrecios Versión Mobile</a>"
    '    strHTML += "</td>"
    '    strHTML += "</tr>"
    '    strHTML += "<tr>"
    '    strHTML += "<td>Equipo Capa8</td>"
    '    strHTML += "</tr>"
    '    strHTML += "</table>"


    '    'msg.[To].Add(txtCorreoElectronico.Text.Trim)
    '    'msg.From = New MailAddress("hernanjaraf@gmail.com", "Soluciones Capa8", System.Text.Encoding.UTF8)
    '    'msg.Subject = "Direcciones WikiPrecios"
    '    'msg.SubjectEncoding = System.Text.Encoding.UTF8
    '    'msg.Body = strHTML
    '    'msg.IsBodyHtml = True
    '    'msg.BodyEncoding = System.Text.Encoding.UTF8

    '    ''Aquí es donde se hace lo especial
    '    'Dim client As New SmtpClient()
    '    'client.Credentials = New System.Net.NetworkCredential("hernanjaraf@gmail.com", "renata_2004")
    '    'client.Port = 587
    '    'client.Host = "smtp.gmail.com"
    '    'client.EnableSsl = True
    '    ''Esto es para que vaya a través de SSL que es obligatorio con GMail

    '    'client.Send(msg)

    '    smtpRosen.Credentials = New System.Net.NetworkCredential("cargentina", "argentina")

    '    email_links.From = New MailAddress("hernan.jara@rosen.cl", "Soluciones Capa8")
    '    email_links.To.Add(txtCorreoElectronico.Text.Trim)
    '    email_links.Subject = "Máxima capacidad Falabella superada."
    '    email_links.Body = strHTML
    '    email_links.IsBodyHtml = True
    '    smtpRosen.UseDefaultCredentials = True
    '    smtpRosen.Send(email_links)




    'End Sub

End Class